//
//  FPAlertViewShow.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/24.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPAlertViewShow.h"

@implementation FPAlertViewShow
//根据NSTimer来给AlertView定时, 让显示完后消失
+ (void)timerFireMethod:(NSTimer*)theTimer//弹出框
{
    UIAlertView *promptAlert = (UIAlertView*)[theTimer userInfo];
    [promptAlert dismissWithClickedButtonIndex:0 animated:NO];
    promptAlert =NULL;
    
}

//弹出AlertView
+ (void)showAlert:(NSString *) _message
{//时间
    UIAlertView *promptAlert = [[UIAlertView alloc] initWithTitle:@"提示:" message:_message delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
    
    [NSTimer scheduledTimerWithTimeInterval:1.0f
                                     target:self
                                   selector:@selector(timerFireMethod:)
                                   userInfo:promptAlert
                                    repeats:YES];
    [promptAlert show];
}
@end
